<h1><%= @museum.name %></h1>

<% if @museum.entities.size > 0%>
	<p>This website knows about <%= pluralize(@museum.entities.size, "object") %> in the <%= @museum.name %>'s collections, including:</p>

	<% link_list = Array.new %>


	<% @countries.each do |country| %>
		<% link_list << list_link_to(pluralize(country.entity_count, "object") + " from " + country.name, museum_country_path(@museum, country.id)) %>
	<% end%>
	
	<% @top_object_types.each do |object_type| %>
		<% link_list << list_link_to(object_type.count + " " + object_type.name.pluralize, museum_country_path(@museum, object_type.id)) %>
	<% end %>

	<% if @top_years.size > 0 %>
		<% @top_years.each do |top_year| %>
			<% link_list << list_link_to(top_year.count + " objects collected in " + top_year.acquired_year, museum_year_path(@museum, top_year.acquired_year)) %>
		<% end %>
	<% end %>

	<% link_list.sort! %>

	<ul>
		<% link_list.each do |link| %>
			<%= link %>
		<% end%>
	</ul>

<% else %>

	<p>There aren't any objects associated with this museum yet. You could <%= link_to "add some manually", new_museum_object_path(@museum) %> or <%= link_to "import a whole load", import_museum_objects_path(@museum) %>.</p>

<% end%>